<?php
  require_once('db_connection.php');
  $query = "SELECT * FROM `users`";
  $result = mysql_query($query) or die(mysql_error());
?>
<table  border="1" cellpadding="0" cellspacing="0" width="80%" align="center">
  <thead>
    <tr>
      <th colspan="4">All Users</th>
    </tr>
    <tr>
      <th>Name</th>
      <th>Email</th>
      <th>Added date</th>
      <th>Status</th>
    </tr>
  </thead>
  <tbody>
<?php
while($ans = mysql_fetch_assoc($result)) {
?>
    <tr>
      <td align="right"><?=$ans['name']?></td>
      <td align="right"><?=$ans['email']?></td>
      <td align="right"><?=$ans['added_date']?></td>
      <td align="right"><?=$ans['status']?></td>
    </tr>
<?php
} // end while
?>
  </tbody>
</table>
